package com.whf.utils;

import java.util.Random;

/**
 * key生成器
 *
 */
public class KeyUtil {
    //生成唯一主键
    public static synchronized String uniqueKey() {
        Random random=new Random();
        //生成6位随机数
        Integer number = random.nextInt(900000) + 100000;
        return System.currentTimeMillis()+String.valueOf(number);
    }
}
